package com.atguigu.day02


import org.apache.flink.streaming.api.scala.{StreamExecutionEnvironment, createTypeInformation}


object Example4 {
  def main(args: Array[String]): Unit = {
    val env = StreamExecutionEnvironment.getExecutionEnvironment
    env.setParallelism(1)

    val stringDataStream = env.fromElements("zhang3", "li4", "wang5")
    stringDataStream.flatMap(x=>x match {
      case "zhang3"=>x
      case "li4"=>Array(x,x)
      case _  =>Nil
    }).print()


    env.execute()
  }


}

